import { defineStore } from "pinia";
import { Names } from "./store_name";

export const useCounterStore = defineStore(Names.COUNT, () => {
  const count = ref(0);
  const name = "小鱼儿";
  const doubleCount = computed(() => count.value * 2);
  function increment() {
    count.value++;
  }
  function reset() {
    count.value = 0;
  }
  return { count, name, doubleCount, increment, reset };
});
